﻿@model List<KRM.Core.tblKRMPhoto>
@{
    ViewBag.Title = "AddPhotoDispute";
    Layout = "~/Views/Shared/_PopupLayout.cshtml";
    var disputeid = ViewBag.DisputeId;
}

<div style="padding: 10px">
    @Html.Partial("Partial/_MessageResult")
    <form action="/rdm/addphotodispute" method="POST" enctype="multipart/form-data">
        <input type="hidden" name="disputeid" value="@disputeid"/>
        <div class="row-fluid">
            <div class="span2">Choose Photo</div>
            <div class="span6">
                <input type="file" name="image" required="required" id="ip-image" />
            </div>
            <div class="span2">
                <input type="submit" class="btn btn-primary" value="Add" />
            </div>
        </div>
    </form>
    <table class="table table-bordered table-fix table-hover">
        <thead>
            <tr>
                <th>Image</th>
                <th>Name</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var photo in Model)
            {
                <tr>
                    <td>
                        <img src="/rdm/getfile?path=@photo.Path" style="width: 80px; height: 60px" alt="@photo.Name" /></td>
                    <td>@photo.Name</td>
                    <td>@photo.Description</td>
                </tr>
            }
        </tbody>
    </table>
</div>
